package com.plian.system.wrapper.hr.hrbackup;

import com.plian.system.dto.hr.staff.OverseasMembersDTO;
import com.plian.system.dto.hr.staffBackup.OverseasMembersOldDTO;
import com.plian.system.entity.hr.staff.OverseasMembers;
import com.plian.system.entity.hr.staffAnnualBackup.OverseasMembersOld;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.hr.staff.OverseasMembersVO;
import com.plian.system.vo.hr.staffAnnualBackup.OverseasMembersOldVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.DICT_CODE_TO_NAME;
import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

/**
 * 侨眷情况包装类,返回视图层所需的字段
 *
 * @author gangan
 * @since 2019-11-12
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface OverseasMembersOldWrapper extends BaseWrapper<OverseasMembersOld, OverseasMembersOldDTO, OverseasMembersOldVO> {


	@Override
	@Mappings(value = {
			@Mapping(source = "overseasSex", target = "overseasSexName", qualifiedByName = DICT_CODE_TO_NAME)
	})
	OverseasMembersOldVO entityToVO(OverseasMembersOld entity);
}
